#define _CRT_SECURE_NO_WARNINGS
#pragma warning(disable:6031)
/**
 * Definition for a binary tree node.
 * struct TreeNode {
 *     int val;
 *     struct TreeNode *left;
 *     struct TreeNode *right;
 * };
 */


//int getdepth(struct TreeNode* root) {
//    if (root == NULL)
//        return 0;
//    int leftdepth = getdepth(root->left);
//    int rightdepth = getdepth(root->right);
//    int depth = 1 + (leftdepth > rightdepth ? leftdepth : rightdepth);
//    return depth;
//}